import Layout from '@/layout'

const financeRouter = {
  path: '/finance',
  component: Layout,
  redirect: '/finance/account',
  name: 'Finance',
  meta: {
    title: '财务管理',
  },
  children: [
    {
      path: 'account',
      name: 'Account',
      meta: { title: '资金账号' },
      component: () => import('@/views/finance/account'),
    },
    {
      path: 'expense',
      component: () => import('@/views/finance/expense/index'),
      name: 'Expense',
      meta: { title: '费用单' }
    },
    {
      path: 'income',
      component: () => import('@/views/finance/income/index'),
      name: 'Income',
      meta: { title: '其他收入单' }
    },
    {
      path: 'borrow',
      component: () => import('@/views/finance/borrow/'),
      name: 'Borrow',
      meta: { title: '资金借入' }
    },
    {
      path: 'lend',
      component: () => import('@/views/finance/lend/'),
      name: 'Lend',
      meta: { title: '资金借出' }
    },
    {
      path: 'journal',
      component: () => import('@/views/finance/journal/journal'),
      name: 'Journal',
      meta: { title: '流水账' }
    },
    {
      path: 'prepayment',
      component: () => import('@/views/finance/prepayment/'),
      name: 'Prepayment',
      meta: { title: '预付款' }
    },
    {
      path: 'receivable',
      component: () => import('@/views/finance/receivable/'),
      name: 'Receivable',
      meta: { title: '客户应收款' }
    },
    {
      path: 'profit',
      component: () => import('@/views/finance/profit/'),
      name: 'Profit',
      meta: { title: '利润表' }
    },
  ]
}

export default financeRouter